package com.itheima.mapper;

import com.itheima.pojo.Class1;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface ClassMapper {
    @Insert("insert into class (head_teacher, class_name, room_name, start_time, end_time, create_time, update_time)" +
            "values (#{headTeacher},#{className},#{roomName},#{startTime},#{endTime},#{createTime},#{updateTime})")
    void insert(Class1 cls);


    void deleteByIds(String[] ids);

    List<Class1> list(String className, LocalDate beginTime, LocalDate endTime);

    void updateClass(Class1 cls);
}
